/*
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: ZJZ
 * @Date: 2021-03-25 15:22:24
 * @LastEditors: 朱江洲
 * @LastEditTime: 2021-09-22 11:08:02
 */
import request from '@/utils/request'

// 登录方法
export function login(username, password, code, uuid, type) {
  const data = {
    username,
    password,
    code,
    uuid,
    type
  }
  return request({
    url: '/login',
    method: 'post',
    data: data
  })
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: '/getInfo',
    method: 'get'
  })
}

// 退出方法
export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}

// 获取验证码
export function getCodeImg() {
  return request({
    url: '/captchaImage',
    method: 'get'
  })
}

// 注册获取手机验证码
export const getPhoneCode = params => {
  return request({
    method: 'get',
    url: '/getCode',
    params
  })
}

// 注册获取手机验证码
export const register = data => {
  return request({
    method: 'post',
    url: '/register',
    data
  })
}

// 手机号登陆
export const loginCode = data => {
  return request({
    method: 'post',
    url: '/loginCode',
    data
  })
}
// 修改密码
export const resetPsd = data => {
  return request({
    method: 'post',
    url: '/resetPassword',
    data
  })
}
